package infraestructura;

public class PedidoDAO {

    public static PedidoPersistence getDAO(String persistenceMechanism) {
        if (persistenceMechanism.equals("memory")) {
            return PedidoMemoryPersistence.getPersistenceManager();
        } else if ("db".equals(persistenceMechanism)) {
            return PedidoPoolPersistence.getPersistenceManager();
        } else {
            return null;
        }
    }
}
